package com.example.testapp.activity.ui;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Toast;

import com.example.testapp.R;

/**
 * UI 工具组件
 * Created by l on 2016/9/26.
 */

public class SuperUI {

    /**
     * 显示取消收藏成功UI
     */
    public static void showUncollectionUI(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.view_custom_uncollection, null);
        Toast toast = new Toast(context);
        toast.setView(view);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();
    }

    /**
     * 显示收藏成功UI
     */
    public static void showCollectionUI(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.view_custom_collection, null);
        Toast toast = new Toast(context);
        toast.setView(view);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();
    }
}
